package com.chapter01exercise.homework04;

/**
 * @Author 小闽
 * @Date 2024/8/16 9:36
 * @PackageName: com.chapter01exercise.homework04
 * @ClassName: DepartmentManager
 * @Description: 部门经理类
 * @Version 1.0
 */
public class DepartmentManager extends Employee {
    private double bonus;
    public DepartmentManager(String name, double daily_salary, int working_days, double level, double bonus) {
        super(name, daily_salary, working_days, level);
        this.bonus = bonus;
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    /**
     * 重写父类的print_salary方法
     * @return
     */
    @Override
    public double print_salary() {
        System.out.println("部门经理：" + getName() + "薪资为：");
        return super.print_salary() + bonus;
    }
}
